﻿<StackPanel x:Class="NewsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Margin="5,20,0,0">
    <StackPanel.Resources>
        <ResourceDictionary>
            <Style TargetType="TextBlock" x:Key="HeaderStyle">
                <Setter Property="FontSize" Value="29.333"/>
                <Setter Property="FontFamily" Value="Segoe UI Light, Lucida Sans Unicode, Verdana"/>
            </Style>
            <Style TargetType="TextBlock" x:Key="SubHeaderStyle">
                <Setter Property="FontSize" Value="20"/>
                <Setter Property="FontFamily" Value="Segoe UI Light, Lucida Sans Unicode, Verdana"/>
            </Style>
            <Style TargetType="TextBlock" x:Key="ContentStyle">
                <Setter Property="FontSize" Value="15"/>
                <Setter Property="FontFamily" Value="Segoe UI, Lucida Sans Unicode, Verdana"/>
            </Style>
        </ResourceDictionary>
    </StackPanel.Resources>
    <TextBlock Style="{StaticResource HeaderStyle}" Text="Neuigkeiten"/>
    
    <ItemsControl Name="newspanel">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Margin="0,10,0,0">
                    <TextBlock Style="{StaticResource SubHeaderStyle}" Text="{Binding Header}"/>
                    <TextBlock Style="{StaticResource ContentStyle}" Text="{Binding Datum}"/>
                    <TextBlock Style="{StaticResource ContentStyle}" Text="{Binding Text}" TextWrapping="Wrap"/>
                </StackPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</StackPanel>
